import commonMixin from "./mixin/commonMixin"
import dataMixin from "./mixin/dataMixin"
import routerMixin from "./mixin/routerMixin"
import uniPushMixin from "./mixin/uniPushMixin"

import utils from "./utils/utils";

// import commonCss from "./assets/css/common.scss"

export default {
	install: (vue, options) => {
		vue.prototype.$onLaunched = new Promise(resolve => {
			vue.prototype.$isResolve = resolve
		})
	
		if (options) {
			if (options.onLoginError) {
				vue.prototype.$onLoginError = options.onLoginError;
			}
			if (options.onLoginSuccess) {
				vue.prototype.$onLoginSuccess = options.onLoginSuccess;
			}
		}

		// vue.mixin(commonMixin)
		// vue.mixin(dataMixin)
		// vue.mixin(routerMixin)
		// vue.mixin(uniPushMixin)
		// 公共方法
		vue.prototype.$vbUtils = utils;
	}
}
